package Rainwater.controller;

import Rainwater.Service.UserService;
import Rainwater.baen.vo.UserDetailedVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author cfy
 * @date 2024/10/21
 **/
@Controller
@RequestMapping("/rainwater/page")
public class IndividualController {
    @Autowired
    private UserService userService;
    @GetMapping("/individual")
    public ModelAndView pageIndex(){
        UserDetailedVo user = userService.getUser(1);
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("user",user);
        modelAndView.setViewName("data_individual");
        return modelAndView;
    }
}
